package com.caval.bean;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Comment {
    private int comment_id;

    private String username;

    private String comment;

    private double score;

    private String comment_time;

    public int getComment_id() {
        return comment_id;
    }

    public void setComment_id(int comment_id) {
        this.comment_id = comment_id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public String getComment_time() {
        return comment_time;
    }

    public void setComment_time(Date comment_time) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        this.comment_time = sdf.format(comment_time);
    }

    @Override
    public String toString() {
        return "Comment{" +
                "comment_id=" + comment_id +
                ", username='" + username + '\'' +
                ", comment='" + comment + '\'' +
                ", score=" + score +
                ", comment_time='" + comment_time + '\'' +
                '}';
    }
}
